Integrand size = 26, antiderivative size = 1106 \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {i a (e+f x)^2}{b \left (a^2-b^2\right ) d}+\frac {2 a f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right ) d^2}+\frac {i a^2 (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d}-\frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}+\frac {2 a f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right ) d^2}-\frac {i a^2 (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d}+\frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}-\frac {2 i a f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right ) d^3}+\frac {2 a^2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d^2}-\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {2 i a f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right ) d^3}-\frac {2 a^2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d^2}+\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {2 i a^2 f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d^3}-\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {2 i a^2 f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d^3}+\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {a (e+f x)^2 \cos (c+d x)}{\left (a^2-b^2\right ) d (a+b \sin (c+d x))} \]
-2*I*a^2*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2) ^(3/2)/d^3+2*a*f*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a ^2-b^2)/d^2+I*a^2*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b /(a^2-b^2)^(3/2)/d+2*a*f*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2 )))/b/(a^2-b^2)/d^2-I*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2) ))/b/d/(a^2-b^2)^(1/2)-I*a*(f*x+e)^2/b/(a^2-b^2)/d+2*a^2*f*(f*x+e)*polylog (2,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(3/2)/d^2+2*I*a^2*f ^2*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(3/2)/d^3 -2*a^2*f*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2- b^2)^(3/2)/d^2-I*a^2*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)) )/b/(a^2-b^2)^(3/2)/d-2*I*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1 /2)))/b/d^3/(a^2-b^2)^(1/2)-a*(f*x+e)^2*cos(d*x+c)/(a^2-b^2)/d/(a+b*sin(d* x+c))+2*I*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/d^3/(a^2 -b^2)^(1/2)-2*I*a*f^2*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/ (a^2-b^2)/d^3-2*f*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)) )/b/d^2/(a^2-b^2)^(1/2)+2*f*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b ^2)^(1/2)))/b/d^2/(a^2-b^2)^(1/2)+I*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a+( a^2-b^2)^(1/2)))/b/d/(a^2-b^2)^(1/2)-2*I*a*f^2*polylog(2,I*b*exp(I*(d*x+c) )/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)/d^3
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(2279\) vs. \(2(1106)=2212\).
Time = 21.25 (sec) , antiderivative size = 2279, normalized size of antiderivative = 2.06 \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Result too large to show} \]
((2*I)*E^(I*c)*(2*a*e*E^(I*c)*f*x + a*E^(I*c)*f^2*x^2 + (I*b^2*e^2*ArcTan[ (I*a + b*E^(I*(c + d*x)))/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*E^(I*c)) - (I *b^2*e^2*E^(I*c)*ArcTan[(I*a + b*E^(I*(c + d*x)))/Sqrt[a^2 - b^2]])/Sqrt[a ^2 - b^2] + (2*a^2*e*f*ArcTan[(I*a + b*E^(I*(c + d*x)))/Sqrt[a^2 - b^2]])/ (Sqrt[a^2 - b^2]*d*E^(I*c)) - (a*e*E^(I*c)*f*ArcTan[(2*a*E^(I*(c + d*x)))/ (b*(-1 + E^((2*I)*(c + d*x))))])/d + ((2*I)*a^2*e*f*ArcTanh[(-a + I*b*E^(I *(c + d*x)))/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d*E^(I*c)) - (I*a*e*f*Log[ b - (2*I)*a*E^(I*(c + d*x)) - b*E^((2*I)*(c + d*x))])/(d*E^(I*c)) + ((I/2) *a*e*E^(I*c)*f*Log[4*a^2*E^((2*I)*(c + d*x)) + b^2*(-1 + E^((2*I)*(c + d*x )))^2])/d + (I*b^2*e*f*x*Log[1 + (b*E^(I*(2*c + d*x)))/(I*a*E^(I*c) - Sqrt [(-a^2 + b^2)*E^((2*I)*c)])])/Sqrt[(-a^2 + b^2)*E^((2*I)*c)] - (I*b^2*e*E^ ((2*I)*c)*f*x*Log[1 + (b*E^(I*(2*c + d*x)))/(I*a*E^(I*c) - Sqrt[(-a^2 + b^ 2)*E^((2*I)*c)])])/Sqrt[(-a^2 + b^2)*E^((2*I)*c)] - (I*a*f^2*x*Log[1 + (b* E^(I*(2*c + d*x)))/(I*a*E^(I*c) - Sqrt[(-a^2 + b^2)*E^((2*I)*c)])])/(d*E^( I*c)) + (I*a*E^(I*c)*f^2*x*Log[1 + (b*E^(I*(2*c + d*x)))/(I*a*E^(I*c) - Sq rt[(-a^2 + b^2)*E^((2*I)*c)])])/d + ((I/2)*b^2*f^2*x^2*Log[1 + (b*E^(I*(2* c + d*x)))/(I*a*E^(I*c) - Sqrt[(-a^2 + b^2)*E^((2*I)*c)])])/Sqrt[(-a^2 + b ^2)*E^((2*I)*c)] - ((I/2)*b^2*E^((2*I)*c)*f^2*x^2*Log[1 + (b*E^(I*(2*c + d *x)))/(I*a*E^(I*c) - Sqrt[(-a^2 + b^2)*E^((2*I)*c)])])/Sqrt[(-a^2 + b^2)*E ^((2*I)*c)] - (I*b^2*e*f*x*Log[1 + (b*E^(I*(2*c + d*x)))/(I*a*E^(I*c) +...
Time = 2.82 (sec) , antiderivative size = 1106, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {(e+f x)^2}{b (a+b \sin (c+d x))}-\frac {a (e+f x)^2}{b (a+b \sin (c+d x))^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d}-\frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d}+\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d^2}-\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d^2}+\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d^3}-\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) a^2}{b \left (a^2-b^2\right )^{3/2} d^3}-\frac {i (e+f x)^2 a}{b \left (a^2-b^2\right ) d}+\frac {2 f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) a}{b \left (a^2-b^2\right ) d^2}+\frac {2 f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) a}{b \left (a^2-b^2\right ) d^2}-\frac {2 i f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) a}{b \left (a^2-b^2\right ) d^3}-\frac {2 i f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) a}{b \left (a^2-b^2\right ) d^3}-\frac {(e+f x)^2 \cos (c+d x) a}{\left (a^2-b^2\right ) d (a+b \sin (c+d x))}-\frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}+\frac {i (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}-\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {2 i f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}\) |
((-I)*a*(e + f*x)^2)/(b*(a^2 - b^2)*d) + (2*a*f*(e + f*x)*Log[1 - (I*b*E^( I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^2) + (I*a^2*(e + f* x)^2*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^ (3/2)*d) - (I*(e + f*x)^2*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^ 2])])/(b*Sqrt[a^2 - b^2]*d) + (2*a*f*(e + f*x)*Log[1 - (I*b*E^(I*(c + d*x) ))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^2) - (I*a^2*(e + f*x)^2*Log[1 - (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^(3/2)*d) + (I*(e + f*x)^2*Log[1 - (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*Sq rt[a^2 - b^2]*d) - ((2*I)*a*f^2*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt [a^2 - b^2])])/(b*(a^2 - b^2)*d^3) + (2*a^2*f*(e + f*x)*PolyLog[2, (I*b*E^ (I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^(3/2)*d^2) - (2*f*(e + f*x)*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*Sqrt[a ^2 - b^2]*d^2) - ((2*I)*a*f^2*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a ^2 - b^2])])/(b*(a^2 - b^2)*d^3) - (2*a^2*f*(e + f*x)*PolyLog[2, (I*b*E^(I *(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^(3/2)*d^2) + (2*f*(e + f*x)*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*Sqrt[a^2 - b^2]*d^2) + ((2*I)*a^2*f^2*PolyLog[3, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a ^2 - b^2])])/(b*(a^2 - b^2)^(3/2)*d^3) - ((2*I)*f^2*PolyLog[3, (I*b*E^(I*( c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*Sqrt[a^2 - b^2]*d^3) - ((2*I)*a^2*f^ 2*PolyLog[3, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^...
3.3.46.3.1 Defintions of rubi rules used
\[\int \frac {\left (f x +e \right )^{2} \sin \left (d x +c \right )}{\left (a +b \sin \left (d x +c \right )\right )^{2}}d x\]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3122 vs. \(2 (958) = 1916\).
Time = 0.53 (sec) , antiderivative size = 3122, normalized size of antiderivative = 2.82 \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Too large to display} \]
-1/2*(2*(b^4*f^2*sin(d*x + c) + a*b^3*f^2)*sqrt(-(a^2 - b^2)/b^2)*polylog( 3, -(I*a*cos(d*x + c) + a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c ))*sqrt(-(a^2 - b^2)/b^2))/b) - 2*(b^4*f^2*sin(d*x + c) + a*b^3*f^2)*sqrt( -(a^2 - b^2)/b^2)*polylog(3, -(I*a*cos(d*x + c) + a*sin(d*x + c) - (b*cos( d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2))/b) + 2*(b^4*f^2*sin(d *x + c) + a*b^3*f^2)*sqrt(-(a^2 - b^2)/b^2)*polylog(3, -(-I*a*cos(d*x + c) + a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/ b^2))/b) - 2*(b^4*f^2*sin(d*x + c) + a*b^3*f^2)*sqrt(-(a^2 - b^2)/b^2)*pol ylog(3, -(-I*a*cos(d*x + c) + a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d *x + c))*sqrt(-(a^2 - b^2)/b^2))/b) + 2*((a^3*b - a*b^3)*d^2*f^2*x^2 + 2*( a^3*b - a*b^3)*d^2*e*f*x + (a^3*b - a*b^3)*d^2*e^2)*cos(d*x + c) + 2*(I*(a ^3*b - a*b^3)*f^2*sin(d*x + c) + I*(a^4 - a^2*b^2)*f^2 + (I*a*b^3*d*f^2*x + I*a*b^3*d*e*f + (I*b^4*d*f^2*x + I*b^4*d*e*f)*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2))*dilog((I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I *b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + 2*(I*(a^3*b - a*b^3) *f^2*sin(d*x + c) + I*(a^4 - a^2*b^2)*f^2 + (-I*a*b^3*d*f^2*x - I*a*b^3*d* e*f + (-I*b^4*d*f^2*x - I*b^4*d*e*f)*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2)) *dilog((I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + 2*(-I*(a^3*b - a*b^3)*f^2*sin(d *x + c) - I*(a^4 - a^2*b^2)*f^2 + (-I*a*b^3*d*f^2*x - I*a*b^3*d*e*f + (...
Timed out. \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
\[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int { \frac {{\left (f x + e\right )}^{2} \sin \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {(e+f x)^2 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Hanged} \]